import query from '@dfeidao/atom-nodejs/db/query';

interface Message {
	id: string;
	productid: string;
}

// 查询数据(角色系统参数)
export default async function atom(msg: Message, action_id: string, session_id: string) {
	const systemid = '12';
	const { exec, prepare } = query(action_id, session_id, systemid);
	prepare('pub_role_sysparams', ['_id', 'role_type_id', 'field', 'fieldtitle', 'productid', 'fieldtype'], { role_type_id: msg.id, productid: msg.productid }, 100, 1, [], []);
	const [data] = await exec();
	return { dataArray: data };
}
